<script setup>
import emojis from "@/utils/emoj";
const emit = defineEmits(["selectEmoj"]);

const selectEmoj = (emoj) => {
  emit("selectEmoj", emoj);
};
</script>

<template>
  <div class="emoj-tip">
    <span
      class="emoj-tip-item"
      v-for="item in emojis"
      :key="item"
      v-html="item"
      @click.stop="selectEmoj(item)"
    ></span>
  </div>
</template>

<style scoped lang="scss">
.emoj-tip {
  position: absolute;
  top: -280px;
  left: -50%;
  width: 400px;
  height: 260px;
  background: #fff;
  box-shadow: 0px 0px 16px 0px rgba(11, 13, 18, 0.06);
  border-radius: 6px 6px 6px 6px;
  border: 1px solid rgba(25, 30, 40, 0.08);
  z-index: 10;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.emoj-tip-item {
  font-size: 22px;
  cursor: pointer;
  border-radius: 8px;
  &:hover {
    background: #f0f0f0;
  }
}
</style>
